let fixShare = share => {
	if (!share || !share.burl) return null;

	let title = share.title ? share.title : '';
	let imageUrl = share.icon ? share.icon : '';
	let path = `/pages/${share.burl}`;

	let query = path.split('?')[1];
	if (!query) query = null;

	return {
		title,
		imageUrl,
		query,
		path,
	};
}

module.exports = {
	fixShare,
}
